﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CloudClipboard
{
    public class SystemConfigInfo
    {
        public string ServerHost { get; private set; }

        public int ServerPort { get; private set; }

        public string ClientGroup { get; private set; }

        public UInt32 GroupHashCode { get; private set; }

        public SystemConfigInfo(string serverHost, int serverPort, string clientGroup)
        {
            this.ServerHost = serverHost;
            this.ServerPort = serverPort;
            this.ClientGroup = clientGroup;

            if (string.IsNullOrWhiteSpace(this.ClientGroup))
            {
                this.GroupHashCode = 0;
            }
            else
            {
                this.GroupHashCode = (UInt32)this.ClientGroup.GetHashCode();
            }
        }
    }
}
